<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let str = '1231234你好啊学习555哈哈哈63335434yhdjds'
        //正向断言，根据后边内容判断
        const req1 = /\d+(?=哈)/
        const res1 = req1.exec(str)
        console.log(res1)
        //0: "555"
        //反向断言，根据前面内容判断
        const req2 = /(?<=哈)\d+/
        const res2 = req2.exec(str)
        console.log(res2)
        //0: "63335434"
    </script>
</body>
</html>
